%display-flex-center {
    display: flex;
    align-items: center;
}
%display-column {
    display: flex;
    flex-direction: column;
}
.ai-model-list-wrapper {
    @extend %display-column;
    gap: 6px;
    height: 100%;
    overflow: hidden;
    .ai-model-list-header {
        @extend %display-flex-center;
        justify-content: space-between;
        gap: 4px;
        padding: 8px 12px 0;
        .ai-model-list-header-left {
            @extend %display-flex-center;
            gap: 4px;
        }
        .ai-model-list-header-right {
            @extend %display-flex-center;
        }
    }
}
.ai-model-list-total {
    width: fit-content;
    height: 16px;
    padding: 0px 8px;
    border-radius: 8px;
    background: var(--Colors-Use-Neutral-Bg-Hover);
    color: var(--Colors-Use-Neutral-Text-3-Secondary);
    line-height: 16px;
}
.ai-online-model-list {
    &-row {
        @extend %display-flex-center;
        gap: 4px;
        padding: 10px 12px 10px 4px;
        height: 44px;
        &:hover {
            background-color: var(--Colors-Use-Neutral-Bg);
            .drag-sort-icon {
                opacity: 1;
            }
            .ai-online-model-list-item-edit {
                display: flex;
            }
            .ai-online-model-list-item-model {
                display: none;
            }
        }
        .drag-sort-icon {
            width: 16px;
            height: 16px;
            svg {
                width: 16px;
                height: 16px;
                color: var(--Colors-Use-Neutral-Disable);
            }
            opacity: 0;
        }
    }
    &-row-isDragging {
        background-color: var(--Colors-Use-Neutral-Bg);
        .drag-sort-icon {
            opacity: 1;
        }
        .ai-online-model-list-item-edit {
            display: flex;
        }
        .ai-online-model-list-item-model {
            display: none;
        }
    }
    &-item {
        @extend %display-flex-center;
        gap: 4px;
        justify-content: space-between;
        overflow: hidden;
        flex: 1;
        &-header {
            @extend %display-flex-center;
            gap: 4px;
            overflow: hidden;
            font-size: 14px;
            color: var(--Colors-Use-Neutral-Text-1-Title);
            line-height: 16px;
            svg {
                width: 24px;
                height: 24px;
            }
        }
        &-type {
            font-weight: 500;
            white-space: nowrap;
            text-overflow: ellipsis;
            overflow: hidden;
            word-break: break-all;
        }
        &-model {
            color: var(--Colors-Use-Neutral-Text-3-Secondary);
            border-radius: 20px;
            background: var(--Colors-Use-Neutral-Bg-Hover);
            padding: 2px 6px;
            @extend %display-flex-center;
            gap: 4px;
            line-height: 16px;
            height: 16px;
            font-size: 11px;
            overflow: hidden;
            &-text {
                white-space: nowrap;
                text-overflow: ellipsis;
                overflow: hidden;
                word-break: break-all;
            }
            .atom-icon {
                svg {
                    width: 12px;
                    height: 12px;
                }
            }
        }

        &-edit {
            @extend %display-flex-center;
            display: none;
            gap: 4px;
        }
        .trash-icon {
            svg {
                color: var(--Colors-Use-Error-Primary);
            }
        }
    }
}
.ai-local-model-list-wrapper {
    border-bottom: 1px solid var(--Colors-Use-Neutral-Border);
    .ai-local-model-list-title {
        @extend %display-flex-center;
        padding: 8px 12px 0;
        gap: 4px;
    }

    .ai-local-model-list {
        &-row {
            @extend %display-column;
            gap: 4px;
            padding: 12px;
            &:hover {
                background-color: var(--Colors-Use-Neutral-Bg);
                .ai-local-model-heard-extra-btns {
                    display: flex;
                }
            }
        }
        &-item {
            @extend %display-column;
            gap: 4px;

            .ai-local-model-heard {
                @extend %display-flex-center;
                justify-content: space-between;
                gap: 4px;
                flex-shrink: 0;
                overflow: hidden;
                height: 24px;

                &-left {
                    @extend %display-flex-center;
                    overflow: hidden;
                    gap: 4px;
                    &-name {
                        color: var(--Colors-Use-Neutral-Text-1-Title);
                        font-size: 12px;
                        font-weight: 600;
                        line-height: 16px;
                        white-space: nowrap;
                        text-overflow: ellipsis;
                        overflow: hidden;
                        word-break: break-all;
                    }
                    .type-icon {
                        svg {
                            width: 12px;
                            height: 12px;
                        }
                    }
                }
                &-extra {
                    @extend %display-flex-center;
                    gap: 4px;
                    justify-content: flex-end;
                    &-btns {
                        align-items: center;
                        display: none;
                    }
                    &-btns-hover {
                        display: flex;
                    }
                }
            }
            .ai-local-model-description {
                color: var(--Colors-Use-Neutral-Text-3-Secondary);
                font-size: 12px;
                font-weight: 400;
                line-height: 16px;
                letter-spacing: 0.5px;
                max-height: 32px;
                flex-shrink: 0;

                overflow: hidden;
                text-overflow: ellipsis;
                display: -webkit-box;
                -webkit-line-clamp: 2;
                -webkit-box-orient: vertical;
            }
            .ai-local-model-footer {
                @extend %display-flex-center;
                gap: 4px;
                color: var(--Colors-Use-Neutral-Text-1-Title);
            }
            .ai-local-model-type-tag {
                border-radius: 20px;
                margin-right: 0;
                display: flex;
                gap: 4px;
            }
        }
    }
}
.ai-local-model-empty {
    @extend %display-column;
    gap: 24px;
    flex: 1;
    .ai-local-model-notice {
        padding: 8px;
        margin: 0 12px 24px;
        background: var(--Colors-Use-Neutral-Bg);
        font-weight: 400;
        font-size: 12px;
        line-height: 16px;
        color: var(--Colors-Use-Neutral-Text-4-Help-text);
        @extend %display-column;
        gap: 4px;
        border-radius: 8px;
        letter-spacing: 0.5px;
        .notice-title {
            color: var(--Colors-Use-Neutral-Text-1-Title);
            font-size: 14px;
            font-style: normal;
            font-weight: 500;
            line-height: 20px;
            @extend %display-flex-center;
            gap: 4px;
            svg {
                width: 18px;
                height: 18px;
                color: var(--Colors-Use-Purple-Primary);
            }
        }
        .copy {
            path {
                stroke-width: 1;
            }
        }
        span {
            margin: 1px 2px;
        }
    }
}
.ai-list-empty-wrapper {
    @extend %display-column;
    gap: 16px;
    padding: 0 12px;
    .ai-list-btns-wrapper {
        @extend %display-flex-center;
        gap: 12px;
        justify-content: center;
    }
}
/**************** ai-local-model-icon start ****************/
.ai-local-model-icon {
    @extend %display-flex-center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--Colors-Use-Lake-blue-Primary);
    color: var(--Colors-Use-Lake-blue-On-Primary);
    svg {
        width: 18px;
        height: 18px;
    }
}

.ai-local-model-icon-ready {
    background-color: var(--Colors-Use-Neutral-Text-1-Title);
    color: var(--Colors-Use-Basic-Background);
}
.ai-local-model-icon-running {
    background-color: var(--Colors-Use-Success-Primary);
    color: var(--Colors-Use-Success-On-Primary);
}

/**************** ai-local-model-icon end ****************/
